package com.peanut.bosskg.service.other.pay;

import com.alibaba.fastjson.JSON;
import com.peanut.bosskg.entity.ResponseMessageVO;
import com.peanut.bosskg.entity.entinfo.CheckBillFileDTO;
import com.peanut.bosskg.entity.pay.CheckBillFileQueryDTO;
import com.peanut.bosskg.enums.FunCodeEnum;
import com.peanut.bosskg.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/***
 *
 *
 * 描    述：对账单文件下载接口
 *
 * 创 建 者：@author zhengxin.wang
 * 创建时间：2022/6/12下午4:35
 * 创建描述：
 *
 */
@Service
@Slf4j
public class CheckBillFileService extends BaseService {


    /**
     * @param funCodeEnum
     * @param checkBillFileQueryDTO
     * @return
     * @throws Exception
     */
    public CheckBillFileDTO doBusiness(FunCodeEnum funCodeEnum, CheckBillFileQueryDTO checkBillFileQueryDTO) throws Exception {
        log.info("对账单文件下载接口开始:{}，{}", funCodeEnum, checkBillFileQueryDTO);
        ResponseMessageVO responseMessage = applyYouFuByHttpPost(funCodeEnum, checkBillFileQueryDTO);
        CheckBillFileDTO parseObject = JSON.parseObject(responseMessage.getResData(), CheckBillFileDTO.class);
        log.info("对账单文件下载接口结束:{}", parseObject);
        return parseObject;
    }

}
